<script type="text/javascript">
$(function(){
//	$.get("inventorymanagement/getFilesInfo",getResponseFilesInfo,"json");
$.post("inventorymanagement/getUserAndBanch",function(json){
		var activeUser = json.activeUser;
		var userNo=activeUser.userNo;
		var branchNo=activeUser.branchNo;
		$("input[name='tellernumber']").val(userNo);
		$("input[name='netpointnumber']").val(branchNo);	
})
	$("#queryTaskByDistributeNo").click(function(){
		var distributeTaskNo = $("#blankDistributeTaskNoByReceiving").val();
		console.log("配送号===>"+distributeTaskNo);
		if(distributeTaskNo){
			if(distributeTaskNo.length<10 || distributeTaskNo.length>10){
				alertMsg.warn("配送任务号的长度为10位！");	
				return false;
			}else if(distributeTaskNo.length==10){
				var year = "20"+distributeTaskNo.substr(1,2);
				var month = distributeTaskNo.substr(3,2);
				var day = distributeTaskNo.substr(5,2);
				var createDate = new Date(year+'/'+month+'/'+day);
				var dateFlag ;
				if(createDate.getFullYear() == year && (createDate.getMonth() + 1) == month && createDate.getDate() == day){
					dateFlag = true;
				}else{
					dateFlag = false;
				}
				if(dateFlag==false){
					alertMsg.warn("请输入正确的制卡批号");
					return false;
				}
			}
		}else{
			alertMsg.warn("配送任务号不能为空");
			return false;
		}
	});
});

/* //刷新每页数量
function paging(){
	var numPerPage=$("#numPerPageByIM").val();
	$("input[name='numPerPage']").val(numPerPage);
	var parm=$("#getCardRece").serialize();
	$.post("inventorymanagement/getCardReceiving",parm, getCardReceiving,"json")
	
};
//下一页
function next(){
	var currentPage=$("input[name='currentPage']").val();
	$("input[name='currentPage']").val(parseInt(currentPage)+1);
 	var parm=$("#getCardRece").serialize(); 
	$.post("inventorymanagement/getCardReceiving",parm,getCardReceiving,"json");
	
};

//上一页
function previous(){
	var currentPage=$("input[name='currentPage']").val();
	$("input[name='currentPage']").val(parseInt(currentPage)-1);
	var parm=$("#getCardRece").serialize();
	$.post("inventorymanagement/getCardReceiving",parm,getCardReceiving,"json");
}; */

function validateCheckBoxByBlank(){
	$("input[name='blankCardReceivingtasked']").attr("checked",true);
	if(!$("input[name='blankCardReceivingtasked']:checked")[0]){
		alertMsg.warn("请确认是否有配送信息！")	
	}
} 

function openDialogTaskeds(a){
	//alert($(a).text());
	var parm=$(a).text()
	var options={"width":"500","height":"400","parm":parm};
	$.pdialog.open("inventorymanagement/cardReceiving","cardre", "任务详细信息",options);
	
}
</script>	
<div class="pageHeader ">
	<form id="getCardRece" method="post" action="inventoryMagOfReceiveBFByCenter/getBlankAndFinishCardReceiving" class="pageForm required-validate" onsubmit="return validateCallback(this,getBlankAndFinishCardReceiving);">
		<input type="hidden" name="currentPage" value="" /> 
		<input type="hidden" name="numPerPage" value="" />
		<input type="hidden" name="pageCount" value="" />
		<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td><label>配送任务号：</label></td>
				<td><input id="blankDistributeTaskNoByReceiving" name="blankDistributeTaskNoByReceiving" type="text" size="20" ></td>
			</tr>
            <tr>
				<td><label>网点编号：</label></td>
				<td><input  name="netpointnumber" class="" type="text" size="20"  readonly="readonly" unselectable="on"/></td>		
			</tr> 
			<tr>
				<td><label>员工编号：</label></td>
				<td><input  name="tellernumber" class="" type="text" size="20"  readonly="readonly" unselectable="on"/></td>		
			</tr> 
		</table>
		<div class="subBar">
			<ul> 
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="queryTaskByDistributeNo" type="submit">查询</button></div></div>
				</li>
			</ul>
		</div>
		</div>
	</form>	
</div>
<form method="post" action="inventoryMagOfReceiveBFByCenter/blankAndRejectCardReceivingRegister" class="pageForm required-validate" onsubmit="return validateCallback(this,printViewPageAjaxDone);" >

		<!-- <input id="bankName" name="bankName" type="hidden" value="">
		<input id="companyName" name="companyName" type="hidden" value=""> -->
	 <input id="storageModdeByTurnIn" name="storageModdeByTurnIn" type="hidden" value="04">
	 <div class="pageContent" >
	 <div id="blankandfinshcardrec">
		<table class="table" width="660" layoutH="320">
			<thead>
				<tr>
					<th width="3%" align="center"><input type="checkbox" id="cardReceiv" name="cardReceivingtaskedByTotal" group="blankCardReceivingtasked" class="checkboxCtrl"></th>
					<th width="3%" align="center">序号</th>
					<th width="14%" align="center">市民卡号</th>
				</tr>
			</thead>
			<tbody id="blankAndFinishCardReceiving">
			</tbody>
		</table>
		</div>
	 <div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'blankAndFinishCardReceiving',getBlankAndFinishCardReceiving">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span id="totalCountByBlankAndFinished">条，共0条</span>
		</div>
		<div callback='getBlankAndFinishCardReceiving' id="paginationByQueryBlankAndFinishCard" rel="blankAndFinishCardReceiving" class="pagination" targetType="navTab" totalCount="200" numPerPage="10" pageNumShown="1" currentPage="1"></div>
		
		<!-- <div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div> -->
			<div id="paginationByCardReceiving" class="pagination1"  ></div>
	</div>
	<div class="formBar">	
			<ul>
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="subTask" onclick="return validateCheckBoxByBlank()" type="submit">入库</button></div></div>
				</li>
			</ul>			
	</div>
</div>
	</form>

	



